package cn.com.simple.learning.designpattern.create.abstractfactory;

/**
 * @author Jianxing.Jia
 * @date 2022/2/7
 * @description 描述信息
 */
public class VehicleFactory extends AbstractFactory {

    public Vehicle getVehicle(String type) {
        switch (type) {
            case "car":
                return new Car();
            case "bus":
                return new Bus();
            default:
                return null;
        }
    }
}
